<template>
  <t-image-viewer v-if="!store.isMobileType" v-model:visible="ImgVisible" :images="[urls + props.info.value]">
  </t-image-viewer>
  <van-image-preview :show-index="false" v-else v-model:show="ImgVisible" :images="[urls + props.info.value]">
  </van-image-preview>
  <div
    class="outline-parent jy-style-height border-hover-style"
    :class="{ 'outline-parent-zsj': getId() == 615265577537605 && props.indexs === 0 }"
  >
    <div class="Showroom-parent" v-if="props.info.digitalShowroom">
      <digitalShowroomInfo :url="props.info.digitalShowroom" :id="props.info.id" />
    </div>
    <img
      class="outline-parent-bg"
      :src="publicUrls + 'free/style11/Level1outlineStyle1Bg.webp'"
      alt=""
    />
    <div class="outline jy-style-height">
      <div class="outline-content">
        <div class="content-tiitle">{{ props.info.text }}</div>
        <p class="outline-subTitle" v-if="props.info.subTitle">——{{ props.info.subTitle }}</p>

        <TextMax
          v-if="props.domShow"
          :infoData="props.info"
          :data="props.info.remarks"
          :title="props.info.text"
          :row="
            props.info.value && !props.info.subTitle
              ? 11
              : props.info.value && props.info.subTitle
              ? 8
              : !props.info.value && props.info.subTitle
              ? 15
              : 16
          "
        ></TextMax>
        <div class="cover" v-if="props.info.value">
          <img @click="ImgVisible = true" :src="urls + props.info.value + '?imageView2/3/format/webp'" alt="" />
        </div>
      </div>
    </div>
    <img class="shadow" :src="publicUrls + 'free/style11/firstLevelOutline1Shadow.webp'" alt="" />
    <IpImage :index="props.indexs" />
  </div>
</template> 

<script lang="ts">
export default defineComponent({
  name: 'free11Style1',
});
</script>

<script setup lang="ts">
import ExpandableText from './../../../textMode/ExpandableText.vue';
import digitalShowroomInfo from '@/freeComponents/unitdigitalShowroom/style11.vue';
import { publicUrls } from '@/utils/minxin';
import { getTextHtml } from '@/utils/minxin';
import { urls } from '@/utils/request/upload';
import { defineComponent, nextTick, ref } from 'vue';
import TextMax from '@/freeComponents/textMode/TextMax.vue';
import { useProjectStore } from '@/store';
import { useRoute } from 'vue-router';
import getId from '@/utils/getId';
import IpImage from './IpImage.vue';
const store = useProjectStore();
const ImgVisible = ref(false);
const route = useRoute();

const props = defineProps({
  info: {
    type: Object,
  },
  indexs: {
    type: Number,
  },
  domShow: {
    type: Boolean,
  },
});
// 跳转全景链接
const open = (url: any) => {
  if (url) {
    window.open(url, '_blank');
  }
};
</script> 

<style scoped lang="less">
.outline-parent {
  position: relative;
  margin-top: 0;
  margin-right: 280px;
  .shadow {
    width: 235px;
    height: 250px;
    position: absolute;
    bottom: 0;
    right: -235px;
  }
}
.outline-parent-zsj {
  margin-right: 880px;
}
.outline-parent-bg {
  width: 620px;
  height: calc(100%);
}
.Showroom-parent {
  position: absolute;
  top: 32px;
  right: 76px;
  z-index: 21;
}
.outline {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}
.outline-content {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  padding: 95px 46px 71px 26px;
}
.content-tiitle {
  width: 100%;
  color: #ffecc3;
  text-shadow: 0px 5px 3px rgba(0, 0, 0, 0.3), 0px 2px 0px #726751;
  font-family: SourceHanSerifCN-Bold;
  font-size: 32px;
  line-height: 32px;
  text-align: center;
  margin-right: 8px;
  margin-bottom: 127px;
}

.outline-subTitle {
  width: 390px;
  color: #ffecc3;
  text-align: center;
  font-size: 18px;
  line-height: 28px;
  margin-bottom: 33px;
}
.cover {
  display: flex;
  align-items: center;
  width: 390px;
  height: 200px;
  overflow: hidden;
  background: #796f59;
  flex: 1;
  img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}
::v-deep .textMore-box {
  width: 390px;
  flex: 1;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
}
::v-deep .van-text-ellipsis {
  font-size: 16px !important;
  color: #fff !important;
  line-height: 32px !important;
}
::v-deep .van-text-ellipsis__action::before {
  color: #ffecc3 !important;
  font-weight: 400 !important;
}
</style>